import { createRouter, createWebHistory } from 'vue-router';
const routes = [
    {
        path: '/', // 根路径
        name: 'Home',
        component: () => import('../views/Tabbar.vue')
    },
    {
        path: '/info', // 根路径
        name: '信息展示',
        component: () => import('../views/llj/Info.vue')
    },
    {
        path: '/login', // 根路径
        name: '登录',
        component: () => import('../views/lyh/Login.vue')
    },
    {
        path: '/Total', 
        name: '个人中心',
        component: () => import('../views/Tabbar.vue'),
        redirect: '/Home',
        children: [
            {
                path: '/Home',
                name: '首页',
                component: () => import('../views/yyq/Home.vue')
            },
            {
                path: '/Fond',
                name: '发现',
                component: () => import('../views/hwj/Home.vue')
            },
            {
                path: '/Message',
                name: '消息',
                component: () => import('../views/gyj/Home.vue')
            },
            {
                path: '/My',
                name: '我的',
                component: () => import('../views/llj/Center.vue')
            },
        ]
    },
];

const router = createRouter({
    history: createWebHistory(), // 使用 HTML5 历史模式
    routes, // 路由配置
});

export default router;